* Nicolai Petrovsky
* nicolai.petrovsky@uky.edu


* This do-file generates all variables and obtains all results reported 
* in the Journal of Public Administration Research and Theory (2010) article 
* "Does Public Service Performance Affect Top Management Turnover?" 
* by George A. Boyne, Oliver James, Peter John, and Nicolai Petrovsky


* Stata version 9.2
* last modified May 2, 2013


* The first step you have to take is to download our data set from the 
* UK Data Archive.  Please go to 
* http://store.data-archive.ac.uk/store/
* and on the right-hand side, under "SEARCH PROJECTS", 
* search for "Petrovsky".  
* You will be taken to our data set.  

* Please download it (the filename is BoyneJamesJohnPetrovsky.dta) and 
* save it in the same directory as this do-file.  

* Then , please use Stata's command
* cd
* to change to that directory.

* Now you can run this do-file.


* How to find the result(s) you are interested in: 

* Since there is a lot of material in this do-file, you can find the results 
* for the items that most interest you in the following way: 
* After running this do-file, view the log-file (JPART2010.smcl) and search within it for 
* "Page i271" if you would like to see a result from page i271 in the article; same 
* for all other pages with results.  
* (For searchin within the log-file, click the search button on the top left-hand 
*  side of the Stata viewer.)

clear
clear mata
version 9.2
set more off
set memory 40m
set scheme s1mono

* Open a log and allow for replacement
log using JPART2010.smcl, replace

* Open data
use BoyneJamesJohnPetrovsky.dta
save workfile, replace

* Generate necessary variables
gen l1newceo = L1.newceo
gen l2newceo = L2.newceo
gen l1newceoXsp_per = l1newceo * sp_per
gen l2newceoXsp_per = l2newceo * sp_per

forvalues i = 0(1)4 {
  gen int cpa`i' = .
  replace cpa`i' = 0 if cpa ~= .
  replace cpa`i' = 1 if cpa == `i'
}

gen l1newceoXcpa2 = l1newceo * cpa2
gen l2newceoXcpa2 = l2newceo * cpa2
gen l1newceoXcpa3 = l1newceo * cpa3
gen l2newceoXcpa3 = l2newceo * cpa3
gen l1newceoXcpa4 = l1newceo * cpa4
gen l2newceoXcpa4 = l2newceo * cpa4

gen l1ca_total = L1.ca_total
replace ca_total = l1ca_total if year == 2003
lab var ca_total "% able to improve"
sum ca_total if year == 2002
sum ca_total if year == 2003

# delimit ;
gen l1elec = L1.elec;
gen l2elec = L2.elec;
gen l3elec = L3.elec;
gen l4elec = L4.elec;
gen l1convote = L1.convote;
gen l2convote = L2.convote;
gen l3convote = L3.convote;
gen l4convote = L4.convote;
gen l1labvote = L1.labvote;
gen l2labvote = L2.labvote;
gen l3labvote = L3.labvote;
gen l4labvote = L4.labvote;
gen l1ldvote = L1.ldvote;
gen l2ldvote = L2.ldvote;
gen l3ldvote = L3.ldvote;
gen l4ldvote = L4.ldvote;
/* Generate a variable indicating the closeness of the LAST election */
egen maxpartyvote = rmax(convote greenvote indvote labvote ldvote);
lab var maxpartyvote "largest party vote share";
gen convote2 = convote;
replace convote2 = . if convote == maxpartyvote;
gen greenvote2 = greenvote;
replace greenvote2 = . if greenvote == maxpartyvote;
gen indvote2 = indvote;
replace indvote2 = . if indvote == maxpartyvote;
gen labvote2 = labvote;
replace labvote2 = . if labvote == maxpartyvote;
gen ldvote2 = ldvote;
replace ldvote2 = . if ldvote == maxpartyvote;
egen secondpartyvote = rmax(convote2 greenvote2 indvote2 labvote2 ldvote2);
lab var secondpartyvote "second largest party vote share";
gen diff2biggestparties = maxpartyvote - secondpartyvote;
lab var diff2biggestparties "Diff. btw. vote share of 2 biggest parties THIS election";
gen diff2maxpartieslast = .;
replace diff2maxpartieslast = L1.diff2biggestparties if (l1elec == 1 | l1elec == 2);
replace diff2maxpartieslast = L2.diff2biggestparties if (l1elec ~= 1 & l1elec ~= 2) & (l2elec == 1 | l2elec == 2);
replace diff2maxpartieslast = L3.diff2biggestparties if (l1elec ~= 1 & l1elec ~= 2) & (l2elec ~= 1 & l2elec ~= 2) & (l3elec == 1 | l3elec == 2);
replace diff2maxpartieslast = L4.diff2biggestparties if (l1elec ~= 1 & l1elec ~= 2) & (l2elec ~= 1 & l2elec ~= 2) & (l3elec ~= 1 & l3elec ~= 2) & (l4elec == 1 | l4elec == 2);
lab var diff2maxpartieslast "Diff. btw. vote share of 2 biggest parties LAST election";
gen d1cpascore = D1.cpa;
gen cpa_notbetter = .;
replace cpa_notbetter = 1 if d1cpascore <= 0 & d1cpascore ~= .;
replace cpa_notbetter = 0 if d1cpascore > 0 & d1cpascore ~= .;
lab var cpa_notbetter "CPA not improved";
lab def cpa_notbetter 0 "CPA not improved" 1 "CPA improved";
lab val cpa_notbetter cpa_notbetter;
tab elec, nol;
tab elec, generate(elecs);
rename elecs1 elecnone;
lab var elecnone "no election";
rename elecs2 elecwhole;
lab var elecwhole "whole council elec.";
rename elecs3 electhirds;
lab var electhirds "elec. by thirds";
/* Check: */
tab elec elecwhole;
tab elec electhirds;
tab elec elecnone;
save, replace;
sort lacode year;
gen d1sp_per = D1.sp_per;
gen l1sp_per = L1.sp_per;
lab var d1sp_per "Chg. in serv. perf.";
gen l3bv3 = L3._3;
replace l3bv3 = . if year == 2006;
sum l3bv3 if year == 2003;
gen bv3change = _3 - l3bv3;
lab var bv3change "Chg. in BV3";
/* Generate interactions: */
forval i = 1(1)4 {;
gen cpa`i'Xelecwhole = cpa`i' * elecwhole;
gen l1cpa`i'Xelecwhole = L1.cpa`i' * elecwhole;
gen cpa`i'Xelecthirds = cpa`i' * electhirds;
gen l1cpa`i'Xelecthirds = L1.cpa`i' * electhirds;
gen cpa`i'Xdiff2maxpartieslast = cpa`i' * diff2maxpartieslast;
gen l1cpa`i'Xdiff2maxpartieslast = L1.cpa`i' * diff2maxpartieslast;
};
gen cpa_notbetterXelecwhole = cpa_notbetter * elecwhole;
gen cpa_notbetterXelecthirds = cpa_notbetter * electhirds;
gen cpa_notbetterXdiff2max = cpa_notbetter * diff2maxpartieslast;
gen cpa_notbetterXcontrolchange = cpa_notbetter * controlchange;
gen sp_perXelecwhole = sp_per * elecwhole;
gen l1sp_perXelecwhole = l1sp_per * elecwhole;
gen sp_perXelecthirds = sp_per * electhirds;
gen l1sp_perXelecthirds = l1sp_per * electhirds;
gen sp_perXdiff2max = sp_per * diff2maxpartieslast;
gen l1sp_perXdiff2max = l1sp_per * diff2maxpartieslast;
gen sp_perXcontrolchange = sp_per * controlchange;
gen l1sp_perXcontrolchange = l1sp_per * controlchange;
gen d1sp_perXelecwhole = d1sp_per * elecwhole;
gen d1sp_perXelecthirds = d1sp_per * electhirds;
gen d1sp_perXdiff2max = d1sp_per * diff2maxpartieslast;
gen d1sp_perXcontrolchange = d1sp_per * controlchange;
gen bv3Xelecwhole = _3 * elecwhole;
gen bv3Xelecthirds = _3 * electhirds;
gen bv3Xdiff2max = _3 * diff2maxpartieslast;
gen bv3Xcontrolchange = _3 * controlchange;
gen d1bv3Xelecwhole = bv3change * elecwhole;
gen d1bv3Xelecthirds = bv3change * electhirds;
gen d1bv3Xdiff2max = bv3change * diff2maxpartieslast;
gen d1bv3Xcontrolchange = bv3change * controlchange;
# delimit cr;

egen bv3changerank = rank(bv3change) if year == 2003, field
egen ca_totalrank = rank(ca_total) if year == 2003, field
gen gbrankdifference = bv3changerank - ca_totalrank

* Generate common estimation sample for sp_per and cpa models:
 quietly xtreg to1 newceo sp_per d1sp_per /*
*/ elecwhole electhirds diff2maxpartieslast controlchange /*
*/ l1newceo l2newceo logpop01x londonb met y2004 y2005
 gen estsample = 1 if e(sample)

* Generate common estimation sample for sp_per and cpa models:
 quietly reg to1 newceo _3 bv3change elecwhole electhirds diff2maxpartieslast controlchange /*
*/ ca_total /*
*/ l1newceo l2newceo /*
*/ logpop01x londonb met
 gen estsampleCS = 1 if e(sample)

* Page i267: examination of the first dependent variable (the turnover rate of the 
* senior management team excluding the chief executive)

* TO1 (most conservative; excluding CEO)
 dis "Variance decomposition of TO1 variable:"
 xtsum to1 if estsample == 1
 dis r(sd_w)
 dis r(sd)
 dis 100*(r(sd_w)^2 / r(sd)^2) // approx. % within variation (% of total variation)
 dis 100*(r(sd_b)^2 / r(sd)^2) // approx. % between variation (% of total variation)

* Page i267: examination of the second dependent variable (presence or absence of 
* a chief executive succession)

xtsum newceo if estsample == 1
 dis r(sd_w)
 dis r(sd)
 dis 100*(r(sd_w)^2 / r(sd)^2) // approx. % within variation (% of total variation)
 dis 100*(r(sd_b)^2 / r(sd)^2) // approx. % between variation (% of total variation)
xttab newceo if estsample == 1
xttrans newceo if estsample == 1, freq

* Page i266: Table 1 (Summary Statistics)

sum to1 newceo /*
 */ sp_per d1sp_per cpa0 cpa1 cpa2 cpa3 cpa4 cpa_notbetter _3 bv3change /*
 */ elecwhole electhirds diff2maxpartieslast controlchange /*
 */ l1newceo l2newceo /*
 */ ca_total /*
 */ logpop01x londonb met if estsample == 1

* Page i271: Table 2 (Panel Linear Regression Models (Random Effects) Explaining the Senior 
* Management Turnover Rate)

* Model 2.1: 

* (i) FE or RE?
quietly xtreg to1 sp_per d1sp_per /*
*/ elecwhole electhirds diff2maxpartieslast controlchange /*
*/ l1newceo l2newceo logpop01x londonb met y2004 y2005 /*
*/ if estsample == 1, fe
est store FE1_1
quietly xtreg to1 sp_per d1sp_per /*
*/ elecwhole electhirds diff2maxpartieslast controlchange /*
*/ l1newceo l2newceo logpop01x londonb met y2004 y2005 /*
*/ if estsample == 1, re
est store RE1_1
dis "Hausman test for TO1 model:"
hausman FE1_1 RE1_1

* (ii) serial correlation?
dis "Wooldridge test of H0: no serial correlation in this model:"
xtserial to1 sp_per d1sp_per /*
*/ elecwhole electhirds diff2maxpartieslast controlchange /*
*/ l1newceo l2newceo logpop01x londonb met y2004 y2005 /*
*/ if estsample == 1

* (iii) obtain coefficient estimates
dis "TO1 model estimates:"
xtreg to1 sp_per d1sp_per /*
*/ elecwhole electhirds diff2maxpartieslast controlchange /*
*/ l1newceo l2newceo logpop01x londonb met y2004 y2005 /*
*/ if estsample == 1, re cluster(lacode)
outreg using JPARTtable2_1.txt, title(Model 2_1) ctitle((2_1)) bdec(3) /*
*/ nor2 replace

* Page i271, Footnote 9: "Although we find evidence of a linear relationship, we also examined whether the 
* relationship might be non-linear. It is conceivable that turnover might be higher at the top and bottom 
* ends of performance than where performance is mediocre. We tested this by including a squared term of 
* performance in all models using the service performance score and overall citizen satisfaction. In none 
* of these models could the null hypothesis of no non-linear relationship be rejected." 

* Generate squared sp_per
gen sp_per_squared = sp_per ^ 2

xtreg to1 sp_per sp_per_squared d1sp_per /*
*/ elecwhole electhirds diff2maxpartieslast controlchange /*
*/ l1newceo l2newceo logpop01x londonb met y2004 y2005 /*
*/ if estsample == 1, re cluster(lacode)

* Page i274, Footnote 12: "We examined whether the relationship between lagged chief executive succession 
* and senior management turnover is moderated by performance but there is no evidence of this in any model. 
* Nor does chief executive succession, be it in the same year as the senior management turnover, in the 
* year before, or in either year moderate the relationship between performance and the senior management 
* turnover rate." 

xtreg to1 sp_per d1sp_per /*
*/ elecwhole electhirds diff2maxpartieslast controlchange /*
*/ l1newceo l2newceo /*
*/ l1newceoXsp_per l2newceoXsp_per /*
*/ logpop01x londonb met y2004 y2005 /*
*/ if estsample == 1, re cluster(lacode)

test l1newceoXsp_per l2newceoXsp_per

* Model 2.2: 

* (i) FE or RE?
quietly xtreg to1 cpa2 cpa3 cpa4 cpa_notbetter /*
*/ elecwhole electhirds diff2maxpartieslast controlchange /*
*/ l1newceo l2newceo logpop01x londonb met /*
*/ y2004 y2005 if estsample == 1, fe
est store FE1_2
quietly xtreg to1 cpa2 cpa3 cpa4 cpa_notbetter /*
*/ elecwhole electhirds diff2maxpartieslast controlchange /*
*/ l1newceo l2newceo logpop01x londonb met /*
*/ y2004 y2005 if estsample == 1, re
est store RE1_2
dis "Hausman test for TO1 model:"
hausman FE1_2 RE1_2

* (ii) serial correlation?
dis "Wooldridge test of H0: no serial correlation in TO`i' model:"
xtserial to1 cpa2 cpa3 cpa4 cpa_notbetter /*
*/ elecwhole electhirds diff2maxpartieslast controlchange /*
*/ l1newceo l2newceo logpop01x londonb met /*
*/ y2004 y2005 if estsample == 1

* (iii) obtain coefficient estimates
dis "TO1 model estimates:"
xtreg to1 cpa2 cpa3 cpa4 cpa_notbetter /*
*/ elecwhole electhirds diff2maxpartieslast controlchange /*
*/ l1newceo l2newceo logpop01x londonb met /*
*/ y2004 y2005 if estsample == 1, re cluster(lacode)
outreg using JPARTtable2_2.txt, title(Model 2_2) ctitle((2_2)) bdec(3) /*
*/ nor2 replace

* Page i272, Footnote 10: "These reductions in turnover compared to the base group are not statistically 
* identical: a joint test of the restriction that the coefficients on the three higher CPA category dummies 
* are equal is rejected (p = .02). This is because the reduction in turnover is somewhat smaller for councils 
* with three stars than for those with two or four stars. The reduction in turnover is identical for the 
* latter: the hypothesis that the coefficients on the dummies for two stars and four stars are equal cannot 
* be rejected (p = .99)." 

dis "Do all higher categories bring the same reduction in turnover?"
test cpa2=cpa3=cpa4
dis "Coefficient on cpa2 equal to coefficient on cpa4?"
test cpa2=cpa4

* Page i274, Footnote 12: "We examined whether the relationship between lagged chief executive succession 
* and senior management turnover is moderated by performance but there is no evidence of this in any model. 
* Nor does chief executive succession, be it in the same year as the senior management turnover, in the 
* year before, or in either year moderate the relationship between performance and the senior management 
* turnover rate." 

xtreg to1 cpa2 cpa3 cpa4 cpa_notbetter /*
*/ elecwhole electhirds diff2maxpartieslast controlchange /*
*/ l1newceo l2newceo /*
*/ l1newceoXcpa2 l1newceoXcpa3 l1newceoXcpa4 l2newceoXcpa2 l2newceoXcpa3 l2newceoXcpa4 /*
*/ logpop01x londonb met /*
*/ y2004 y2005 if estsample == 1, re cluster(lacode)

test l1newceoXcpa2 l1newceoXcpa3 l1newceoXcpa4
test l2newceoXcpa2 l2newceoXcpa3 l2newceoXcpa4
test l1newceoXcpa2 l1newceoXcpa3 l1newceoXcpa4 l2newceoXcpa2 l2newceoXcpa3 l2newceoXcpa4

* Page i272: Table 3 (Cross-Sectional Linear Regression Model Explaining the Senior Management 
* Turnover Rate Based on Local Citizens' Satisfaction)

* (i) obtain preliminary coefficient estimates
quietly reg to1 _3 bv3change elecwhole electhirds diff2maxpartieslast controlchange /*
*/ ca_total /*
*/ l1newceo l2newceo /*
*/ bv3Xelecwhole bv3Xelecthirds bv3Xdiff2max bv3Xcontrolchange /*
*/ d1bv3Xelecwhole d1bv3Xelecthirds d1bv3Xdiff2max d1bv3Xcontrolchange /*
*/ logpop01x londonb met if estsampleCS == 1, robust

* (ii) test H0: "BV3 does not matter"
dis "Test H0: BV3 does not matter in TO1 model:"
test _3 bv3change /*
*/ bv3Xelecwhole bv3Xelecthirds bv3Xdiff2max bv3Xcontrolchange /*
*/ d1bv3Xelecwhole d1bv3Xelecthirds d1bv3Xdiff2max d1bv3Xcontrolchange

* (iii) test H0: "no relationship w/ preceding CEO succession"
test l1newceo l2newceo

* (iv) obtain final, pruned coefficient estimates
dis "Final, pruned TO1 model estimates:"
reg to1 _3 bv3change elecwhole electhirds diff2maxpartieslast controlchange /*
*/ ca_total /*
*/ l1newceo l2newceo /*
*/ logpop01x londonb met if estsampleCS == 1, robust
outreg using JPARTtable3.txt, title(Model 3) ctitle((3)) bdec(3) /*
*/ nor2 replace

* Page i274, Footnote 12: "We examined whether the relationship between lagged chief executive succession 
* and senior management turnover is moderated by performance but there is no evidence of this in any model. 
* Nor does chief executive succession, be it in the same year as the senior management turnover, in the 
* year before, or in either year moderate the relationship between performance and the senior management 
* turnover rate." 

* Generate the required interactions
gen bv3Xl1newceo = _3 * l1newceo
gen bv3Xl2newceo = _3 * l2newceo

reg to1 _3 bv3change elecwhole electhirds diff2maxpartieslast controlchange /*
*/ ca_total /*
*/ l1newceo l2newceo /*
*/ bv3Xl1newceo bv3Xl2newceo /*
*/ logpop01x londonb met if estsampleCS == 1, robust

test bv3Xl1newceo bv3Xl2newceo

* Page i271, Footnote 9: "Although we find evidence of a linear relationship, we also examined whether the 
* relationship might be non-linear. It is conceivable that turnover might be higher at the top and bottom 
* ends of performance than where performance is mediocre. We tested this by including a squared term of 
* performance in all models using the service performance score and overall citizen satisfaction. In none 
* of these models could the null hypothesis of no non-linear relationship be rejected." 

* Generate squared satisfaction term
gen bv3_squared = _3 ^ 2

reg to1 _3 bv3_squared bv3change elecwhole electhirds diff2maxpartieslast controlchange /*
*/ ca_total /*
*/ l1newceo l2newceo /*
*/ logpop01x londonb met if estsampleCS == 1, robust

* Page i274, Footnote 11: "It is also conceivable that the weakness of these findings is explained by the lack 
* of clarity of responsibility in the rural counties, where some of the services are provided not by the county 
* council but by a number of district councils. We tested this possibility by re-estimating the models in 
* Tables 3 and 5 excluding the counties. The results in Table 3 are virtually unchanged, and in Table 5 the 
* standard error on satisfaction slightly shrinks. The substantive conclusions from both tables remain unchanged." 

reg to1 _3 bv3change elecwhole electhirds diff2maxpartieslast controlchange /*
*/ ca_total /*
*/ l1newceo l2newceo /*
*/ logpop01x londonb met if estsampleCS == 1 & county == 0, robust

* Page i273: Table 4 (Panel Logit Models Explaining the Presence or Absence of a Chief 
* Executive Succession)

* Model 4.1

logit newceo sp_per d1sp_per /*
*/ elecwhole electhirds diff2maxpartieslast controlchange /*
*/ logpop01x londonb met y2004 y2005 /*
*/ if estsample == 1, cluster(lacode)
outreg using JPARTtable4_1.txt, title(Model 4_1) ctitle((4_1)) bdec(3) /*
*/ nor2 replace

mfx, predict(p)

* Page i271, Footnote 9: "Although we find evidence of a linear relationship, we also examined whether the 
* relationship might be non-linear. It is conceivable that turnover might be higher at the top and bottom 
* ends of performance than where performance is mediocre. We tested this by including a squared term of 
* performance in all models using the service performance score and overall citizen satisfaction. In none 
* of these models could the null hypothesis of no non-linear relationship be rejected." 

logit newceo sp_per sp_per_squared d1sp_per /*
*/ elecwhole electhirds diff2maxpartieslast controlchange /*
*/ logpop01x londonb met y2004 y2005 /*
*/ if estsample == 1, cluster(lacode)

* Model 4.2

logit newceo cpa2 cpa3 cpa4 cpa_notbetter /*
*/ elecwhole electhirds diff2maxpartieslast controlchange /*
*/ logpop01x londonb met /*
*/ y2004 y2005 if estsample == 1, cluster(lacode)
dis "cpa categories statistically equal to each other?"
test cpa2=cpa3=cpa4
dis "cpa2 statistically equal to cpa3?"
test cpa2=cpa3
dis "cpa2 statistically equal to cpa4?"
test cpa2=cpa4

* Page i275, Footnote 13: "The two categories are statistically identical." 

dis "cpa3 statistically equal to cpa4?"
test cpa3=cpa4

outreg using JPARTtable4_2.txt, title(Model 4_2) ctitle((4_2)) bdec(3) /*
*/ nor2 replace

mfx, predict(p)

* Page i274: Table 5 (Cross-Sectional Logit Model Explaining the Presence or Absence of 
* a Chief Executive Succession)

* (i) obtain preliminary estimates
quietly logit newceo _3 bv3change elecwhole electhirds diff2maxpartieslast controlchange /*
*/ ca_total /*
*/ bv3Xelecwhole bv3Xelecthirds bv3Xdiff2max bv3Xcontrolchange /*
*/ d1bv3Xelecwhole d1bv3Xelecthirds d1bv3Xdiff2max d1bv3Xcontrolchange /*
*/ logpop01x londonb met if estsampleCS == 1, robust

* (ii) test H0: "BV3 does not matter"
dis "Test H0: BV3 does not matter:"
test _3 bv3change /*
*/ bv3Xelecwhole bv3Xelecthirds bv3Xdiff2max bv3Xcontrolchange /*
*/ d1bv3Xelecwhole d1bv3Xelecthirds d1bv3Xdiff2max d1bv3Xcontrolchange

* (iii) test H0: "no interactions"
dis "Test H0: no interactions:"
test bv3Xelecwhole bv3Xelecthirds bv3Xdiff2max bv3Xcontrolchange /*
*/ d1bv3Xelecwhole d1bv3Xelecthirds d1bv3Xdiff2max d1bv3Xcontrolchange

* (iv) test H0: "no interactions with first differences"
dis "Test H0: no interactions with first differences:"
test d1bv3Xelecwhole d1bv3Xelecthirds d1bv3Xdiff2max d1bv3Xcontrolchange

* (v) obtain final, pruned model estimates
dis "Final, pruned CEO succession model estimates:"
logit newceo _3 bv3change elecwhole electhirds diff2maxpartieslast controlchange /*
*/ ca_total /*
*/ logpop01x londonb met if estsampleCS == 1, robust
outreg using JPARTtable5.txt, title(Model 5) ctitle((5)) bdec(3) /*
*/ nor2 replace

mfx, predict(p)

* Page i271, Footnote 9: "Although we find evidence of a linear relationship, we also examined whether the 
* relationship might be non-linear. It is conceivable that turnover might be higher at the top and bottom 
* ends of performance than where performance is mediocre. We tested this by including a squared term of 
* performance in all models using the service performance score and overall citizen satisfaction. In none 
* of these models could the null hypothesis of no non-linear relationship be rejected." 

logit newceo _3 bv3_squared bv3change elecwhole electhirds diff2maxpartieslast controlchange /*
*/ ca_total /*
*/ logpop01x londonb met if estsampleCS == 1, robust

* Page i274, Footnote 11: "It is also conceivable that the weakness of these findings is explained by the lack 
* of clarity of responsibility in the rural counties, where some of the services are provided not by the county 
* council but by a number of district councils. We tested this possibility by re-estimating the models in 
* Tables 3 and 5 excluding the counties. The results in Table 3 are virtually unchanged, and in Table 5 the 
* standard error on satisfaction slightly shrinks. The substantive conclusions from both tables remain unchanged." 

logit newceo _3 bv3change elecwhole electhirds diff2maxpartieslast controlchange /*
*/ ca_total /*
*/ logpop01x londonb met if estsampleCS == 1 & county == 0, robust

mfx, predict(p)

* Page i266, Footnote 5: "As a robustness check, we also estimated our models using a slightly different 
* indicator of the turnover rate, where in addition to new names on the senior management team, vacancies are 
* also included in the numerator. This produces virtually the same results numerically and changes none of 
* our conclusions. For the sake of clarity, we focus on the most cut and dried definition of the turnover rate." 

* Table 2, Model 2.1 redone with slightly different turnover rate indicator: 

xtreg to2 sp_per d1sp_per /*
*/ elecwhole electhirds diff2maxpartieslast controlchange /*
*/ l1newceo l2newceo logpop01x londonb met y2004 y2005 /*
*/ if estsample == 1, re cluster(lacode)

* Table 2, Model 2.2 redone with slightly different turnover rate indicator: 

xtreg to2 cpa2 cpa3 cpa4 cpa_notbetter /*
*/ elecwhole electhirds diff2maxpartieslast controlchange /*
*/ l1newceo l2newceo logpop01x londonb met /*
*/ y2004 y2005 if estsample == 1, re cluster(lacode)

* Table 3 redone with slightly different turnover rate indicator: 

reg to2 _3 bv3change elecwhole electhirds diff2maxpartieslast controlchange /*
*/ ca_total /*
*/ l1newceo l2newceo /*
*/ logpop01x londonb met if estsampleCS == 1, robust
* You can view a record of all operations and results in the JPART2010.smcl file.

clear
erase workfile.dta
log close
exit
